﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brain.Editor;

namespace Brain.RPG2D
{
    public class Character : IGameVariable
    {
        [TexturePlace]
        public string TexturePlace { get; set; }

        public string Name { get; set; }

        public Character()
        {
            this.Name = NameUtil.GetUniqueName("Character");

            ShouldSerialize = true;
        }

        public bool ShouldSerialize { get; set; }

        public void SerializeData(SerializationData parentData, string add)
        {
            parentData.AddData("Char.Name", this.Name, add);
            parentData.AddData("Char.TexturePlace", this.TexturePlace, add);
        }

        public void DeserializeData(SerializationData parentData, string add)
        {
            this.Name = parentData.GetData<string>("Char.Name", add);
            this.TexturePlace = parentData.GetData<string>("Char.TexturePlace", add);
        }


        public void DeserializedAll()
        {
        }
    }
}
